import { Http } from "../utils/http";
class Cars extends Http {
  constructor(props) {
    super(props);
  }
  list(pageNum = 1, pageSize = 10, carId) {
    let obj = {
      pageNum,
      pageSize,
    };
    if (carId) {
      obj.carId = carId;
    }
    return this.request({
      url: "/mini/center/member/car",
      data: obj,
    });
  }
  detail(obj) {
    return this.request({
      url: "/mini/center/member/car",
      data: obj,
    });
  }
  addEdit(obj) {
    return this.request({
      url: "/mini/center/member/car",
      data: obj,
      method: "POST",
    });
  }
  detele(carId) {
    return this.request({
      url: "/mini/center/member/car?carId=" + carId,
      method: "DELETE",
    });
  }
}
export { Cars };
